﻿<Window x:Class="CodeSHARPer.View.Dialogs.FrameworkAssembliesView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:avalonDock="http://avalondock.codeplex.com"
        Title="Framework Assemblies" Height="600" Width="600" ShowInTaskbar="False"
        Icon="..\..\Themes\Images\App\Ico\app.tools.ico" WindowStartupLocation="CenterOwner" WindowStyle="ToolWindow">

    <Window.Resources>
        <avalonDock:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter"/>
    </Window.Resources>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <StackPanel Orientation="Horizontal">
            <TextBlock Text="Filter: " Margin="5" Padding="3"/>
            <TextBox Text="{Binding Filter, UpdateSourceTrigger=PropertyChanged}" Margin="5" Padding="3" MinWidth="300" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"/>
        </StackPanel>

        <ListView Grid.Row="1" ItemsSource="{Binding UsedReferences}" BorderThickness="0">
            <ListView.View>
                <GridView >
                    <GridView.ColumnHeaderContainerStyle>
                        <Style>
                            <Setter Property="FrameworkElement.Visibility" Value="Collapsed"/>
                        </Style>
                    </GridView.ColumnHeaderContainerStyle>
                    <GridViewColumn Header="IsSeleted">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <CheckBox IsChecked="{Binding IsSeleted}" />
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                    <GridViewColumn Header="Name">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Vertical">
                                    <TextBlock Text="{Binding Name}" TextAlignment="Left"/>
                                    <TextBlock Text="{Binding Location}" TextAlignment="Left"/>
                                </StackPanel>
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                </GridView>
            </ListView.View>
        </ListView>

        <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right">
            <Button Content="OK" Width="75" IsDefault="True" Margin="5" Padding="3"
                    Command="{Binding CloseActivePopUpCommand}" CommandParameter="True" />
            <Button Content="Cancel" Width="75" IsCancel="True" Margin="5" Padding="3"/>
        </StackPanel>

    </Grid>
</Window>
